package com.hq.ims.data.vo;

import java.math.BigDecimal;
import java.time.LocalDateTime;

import com.hq.ims.data.entity.BusiRepeatTypeCountData;
import lombok.Data;
import com.hq.authority.utils.AppUtils;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.util.List;

import org.mapstruct.Mapper;
import org.mapstruct.Mappings;
import org.mapstruct.factory.Mappers;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;
import com.hq.ims.data.vo.auth.BaseRowAuthVo;
import com.hq.ims.data.config.verification.VdAdd;
import com.hq.ims.data.config.verification.VdEdit;
import com.hq.utils.util.ListUtils;
import java.util.stream.Collectors;


/**
 * @author 蒋柏平
 * @since 20241025
 */
@Mapper
public interface BusiRepeatTypeCountDataMapstruct {

    BusiRepeatTypeCountDataMapstruct INSTANCE = Mappers.getMapper(BusiRepeatTypeCountDataMapstruct.class);

    //-------------------------------- 转换VO类 --------------------------------

    @Mappings({
    })
    BusiRepeatTypeCountDataVo toBusiRepeatTypeCountDataVo(BusiRepeatTypeCountData source);

    default List<BusiRepeatTypeCountDataVo> toBusiRepeatTypeCountDataVoList(List<BusiRepeatTypeCountData> source){
        if (source == null) {
            return ListUtils.newEmptyList();
        }
        return source.stream().map(this::toBusiRepeatTypeCountDataVo).collect(Collectors.toList());
    }

    //-------------------------------- 以下为自定义类[输出对象] --------------------------------

    @ApiModel(value = "原始对象的扩展类")
    @Data
    class BusiRepeatTypeCountDataVo extends BusiRepeatTypeCountData {
        
    }

    @ApiModel(value = "行级权限对象")
    @Data
    class BusiRepeatTypeCountDataRowAuthVo extends BaseRowAuthVo {

        //自定义其它行级权限


        //构造函数
        public BusiRepeatTypeCountDataRowAuthVo(BusiRepeatTypeCountData entity){
            //当前操作用户ID
            String userId = AppUtils.getUserId();
        }
        
    }


    //-------------------------------- 以下为自定义类[输入对象] --------------------------------

    @ApiModel(value = "搜索VO")
    @Data
    class PageSearchVo {

    }

    @ApiModel(value = "添加和修改对象")
    @Data
    class SaveVo {

        @NotBlank(message = "数据ID不能为空", groups = {VdEdit.class})
        @ApiModelProperty(value = "数据ID")
        private String busiRepeatTypeCountDataId;

        @NotBlank(message = "重复类型数量ID不能为空", groups = {VdAdd.class, VdEdit.class})
        @Size(min = 1, max = 36, message = "重复类型数量ID长度不能超过36", groups = {VdAdd.class, VdEdit.class})
        @ApiModelProperty(value = "重复类型数量ID")
        private String busiRepeatTypeCountId;

        @ApiModelProperty(value = "施工方")
        private String construction;

        @ApiModelProperty(value = "项目名称")
        private String projectName;

        @ApiModelProperty(value = "业主方")
        private String owner;

        @ApiModelProperty(value = "项目地址")
        private String projectAddress;

        @ApiModelProperty(value = "预计产值规模")
        private BigDecimal outputScale;

        @ApiModelProperty(value = "发布时间")
        private LocalDateTime publishTime;

        @ApiModelProperty(value = "经营信息管理ID")
        private String busiInfoId;

        @ApiModelProperty(value = "相似度")
        private BigDecimal similarityRate;



    }

    //-------------------------------- springboot验证标识 --------------------------------

}
